package com.vhall.component.entity.record;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * @author dongsong
 */
@Data
@TableName("record")
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value = "RecordEntity对象", description = "回放表")
public class RecordEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户id")
    @TableField("account_id")
    @JsonProperty("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "房间id")
    @TableField("il_id")
    @JsonProperty("il_id")
    private Integer ilId;

    @ApiModelProperty(value = "房间活动id")
    @TableField("room_id")
    @JsonProperty("room_id")
    private String roomId;

    /**
     * 来源: 0=回放，1=上传， 2=录制, 10=合成, 11=剪辑
     */
    @ApiModelProperty(value = "来源: 0=回放，1=上传， 2=录制, 10=合成, 11=剪辑")
    @TableField("source")
    private Integer source;

    @ApiModelProperty(value = "视频文件id")
    @TableField("vod_id")
    @JsonProperty("vod_id")
    private String vodId;

    @ApiModelProperty(value = "文件名")
    @TableField("name")
    private String name;

    /**
     * 文件状态:0新增排队中 1转码成功 2转码失败 3转码中 4转码部分成功
     */
    @ApiModelProperty(value = "文件状态:0新增排队中 1转码成功 2转码失败 3转码中 4转码部分成功")
    @TableField("transcode_status")
    @JsonProperty("transcode_status")
    private Integer transcodeStatus;

    @ApiModelProperty(value = "时长/秒")
    @TableField("duration")
    private Integer duration;

    @ApiModelProperty(value = "存储量/KB")
    @TableField("storage")
    private Integer storage;

    @ApiModelProperty(value = "状态 0：正常 1：删除")
    @TableField("status")
    private Integer status;

    /**
     * 只有 回放 才有审核状态
     *
     * @see source = 0
     */
    @ApiModelProperty(value = "审核状态,9:待送审,0:待审核,1:审核通过,-1:审核驳回")
    @TableField("audit_status")
    private Integer auditStatus;

    /**
     * 审核状态(产品类二次审核),9:待送审,0:待审核,1:审核通过,-1:审核驳回
     * @see source = 0
     */
    @ApiModelProperty(value = "审核状态,9:待送审,0:待审核,1:审核通过,-1:审核驳回")
    @TableField("audit_status_second")
    private Integer auditStatusSecond;

    @TableField("created_at")
    @JsonProperty("created_at")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createdAt;

    @TableField("updated_at")
    @JsonProperty("updated_at")
    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updatedAt;

    @ApiModelProperty(value = "删除时间")
    @TableField("deleted_at")
    @JsonProperty("deleted_at")
    private LocalDateTime deletedAt;

    @ApiModelProperty(value = "统计时间")
    @TableField("created_time")
    @JsonProperty("created_time")
    private LocalDateTime createdTime;
    /**
     * 回放章节打点状态| 0：关闭 1：开启
     * @enum ChapterPointStatusEnum
     */
    @ApiModelProperty(value = "章节打点状态")
    @TableField("record_chapter_status")
    @JsonProperty("record_chapter_status")
    private Integer recordChapterStatus;
}